package com.example.demo.config;

import lombok.Data;


/**
 * 自定义异常
 */
@Data
public class ApiException extends RuntimeException {


    private RetEnum ret;
    private String message;


    public ApiException(RetEnum ret) {
        super(ret.asMessage());
        this.ret = ret;
        this.message = ret.asMessage();
    }

    public ApiException(RetEnum ret, String retMessage) {
        super(retMessage);
        this.ret = ret;
        this.message = ret.asMessage();
    }


}
